// ===================================================
// Cards
// ===================================================
.card {
  backface-visibility: hidden;
  will-change: transform;
  position: relative;
  transition: all 0.3s ease;
  margin: 1rem 1.25rem;
  background: var(--card-back-color);
  color: var(--card-fore-color);
  box-shadow: 0px 0px 1px var(--card-shadow-color-a), 0px 6px 12px var(--card-shadow-color-b);
  border-radius: 0.125rem;
  padding: 1rem;
  .card-title {
    font-size: 1.125rem;
    line-height: 1.375;
    font-weight: 500;
    margin: 0px 0px 0.125rem;
    a, a:link, a:visited {
      font-weight: 500;
      transition: 0.3s ease all;
      color: var(--card-fore-color);
    }
  }
  .card-description {
    margin: 0.125rem -0.5rem 0.125rem;
    font-size: 0.875rem;
    color: var(--card-fore-color-light);
    line-height: 1.35;
    font-weight: 500;
  }
  .card-bottom {
    position: relative;
    background: blue;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0.125rem;
    border-top-left-radius: 22px;
  }
  .card-code {
    margin: 1.5rem 0px -1rem 0px;
    background: var(--pre-back-color);
    width: calc(100% - 36px);
    border-radius: 1.375rem 0px 0.125rem 0.125rem;
    line-height: 1.15;
    padding: 2.25rem 1.125rem 2.25rem;
  }
  .card-examples {
    transition: all 0.3s ease;
    position: relative;
    margin: 0.5rem 0px -1rem 0px;
    background: var(--pre-back-color);
    width: calc(100% - 52px);
    border-radius: 0px 0px 0.125rem 0.125rem;
    line-height: 1.15;
    padding: 0.5rem 1.125rem 2.25rem 2.125rem;
    &::before {
      display: block;
      content: '';
      position: absolute;
      left: 21px;
      top: 0;
      width: 1px;
      opacity: 0.75;
      height: calc(100% - 24px);
      background: var(--button-example-toggler-fore-color);
    }
  }
  &.short {
    .card-bottom {
      display: none;
      @media screen and (min-width: $layout-large-breakpoint) {
        display: block;
      }
    }
  }
  &:not(.short) {
    background: linear-gradient(to bottom, var(--card-back-color) 0px, var(--card-back-color) calc(100% - 17px), var(--pre-back-color) calc(100% - 16px));
  }
}

// Card expertise corners
.card-corner {
  box-sizing: border-box;
  position: absolute;
  top: 24px;
  right: 16px;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 0.5rem;
  background: var(--corner-color);
  &.beginner {
    --corner-color: var(--beginner-color);
  }
  &.intermediate {
    --corner-color: var(--intermediate-color);
  }
  &.advanced {
    --corner-color: var(--advanced-color);
  }
  &.intermediate, &.advanced {
    &::before {
      display: block;
      position: absolute;
      content: '';
      top: 0px;
      right: 12px;
      width: 0.5rem;
      height: 0.5rem;
      border-radius: 0.5rem;
      background: var(--corner-color);
    }
  }
  &.advanced {
    &::after {
      display: block;
      position: absolute;
      content: '';
      top: 0px;
      right: 24px;
      width: 0.5rem;
      height: 0.5rem;
      border-radius: 0.5rem;
      background: var(--corner-color);
    }
  }
}

// Tags
:not(.token).tag {
  transition: 0.3s ease all;
  border: 2px solid var(--tag-border-color);
  border-radius: 0.25rem;
  color: var(--tag-fore-color);
  text-transform: uppercase; 
  margin: 0px 0.375rem 0.25rem 0px;
  display: inline-block;
  padding: 0.125rem 0.25rem;
  letter-spacing: 0.25px;
  font-size: 0.625rem;
  line-height: 1.4;
  font-weight: 500;
  &:first-of-type {
    margin-top: 0.375rem;
  }
}

.clickable-card-wrapper {
  &:link, &:visited {
    &:hover, &:focus {
      text-decoration: none;
      .card {
        transform: scale(1.025);
      }
    }
  }
}